Skip to content

Block the package from building on iOS-derived platforms #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025

Conversation

jakepetroules
Copy link
Contributor

@jakepetroules jakepetroules commented Apr 24, 2025

Process spawning is not available there. Also remove a couple overly-specific platform conditions in tests that would be incorrect on other Unix-like platforms such as Android and FreeBSD.

@jakepetroules
Copy link
Contributor Author

@iCharlesHu Can I get an approval, please?

Copy link
Contributor

@itingliu itingliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are to do this should we add an iOS CI (if possible at all)? Otherwise how would we know if a change causes the project to fail to build on iOS?

@@ -166,6 +166,9 @@ extension Configuration {
error: Error,
errorPipe: CreatedPipe
) throws -> Execution<Output, Error> {
#if !os(macOS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The motivation of this change makes sense, but this runtime error inside this function is very non obvious to me.

@iCharlesHu
Copy link
Contributor

Discussed offline: instead of allowing Subprocess to build and throwing a runtime error, we prefer to disallow Subprocess to build on iOS via

platforms: [.macOS(.v13), .iOS("99.0")],

This is the same workaround we used in https://github.com/swiftlang/swift-corelibs-foundation/blob/873a14c644bf194a5dc961b925a626070a141706/Package.swift#L186 to signify that we do not build on iOS.

Process spawning is not available there. Also remove a couple overly-specific platform conditions in tests that would be incorrect on other Unix-like platforms such as Android and FreeBSD.
@jakepetroules
Copy link
Contributor Author

OK, I've made those adjustments.

@jakepetroules jakepetroules changed the title Make the package build on all Apple platforms Block the package from building on iOS-derived platforms May 17, 2025
@iCharlesHu iCharlesHu merged commit 48d9d57 into swiftlang:main May 20, 2025
19 of 20 checks passed
@jakepetroules jakepetroules deleted the platform-ports branch May 21, 2025 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants